<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="csrf-token" content="{{csrf_token()}}">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet"  href="{{URL::asset('resources/xadmin/lib/layui/css/layui.css')}}">
    <script type="text/javascript" src="{{URL::asset('resources/xadmin/lib/layui/layui.js')}}"></script>
</head>
<body>
<i class="layui-icon layui-icon-slider"></i>
<i class="layui-icon layui-icon-print"></i>


<div class="layui-card-body ">

<table class="layui-hide" id="test3" lay-filter="test3"></table>

</div>

<script>
layui.use('table','jquery', function(){
        var table = layui.table;
        var $=layui.jquery;
        consloe.log('@');
        table.render({
            elem: '#test3'
            ,url:'{{URL::action('Admin\ManagerController@lst')}}'
            ,page: true //开启分页
            ,request: {
                pageName: 'curr' //页码的参数名称，默认：page
                ,limitName: 'nums' //每页数据量的参数名，默认：limit
            }
            ,method: 'post'
            ,headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}
            ,cellMinWidth: 80
            ,parseData: function(res){ //res 即为原始返回的数据
                return {
                    "code": res.sta, //解析接口状态
                    "msg": res.mess, //解析提示文本
                    "count": res.count, //解析数据长度
                    "data": res.data //解析数据列表
                };
            }

            ,cols: [[
                 {type:'checkbox'}
                ,{field:'id', title: 'ID', sort: true}
                ,{field:'username', title: '登录名',edit:true}
                ,{field:'gender',title: '性别', sort: true}
                ,{field:'mobile',title: '联系方式'}
                ,{field:'email', title: '邮箱', minWidth:150, }
                ,{field:'role_id', title: '角色', sort: true}
                ,{field:'created_at',title: '加入时间', sort: true}
                ,{field:'status', title: '状态'}
                ,{field:'wealth',  title: '操作'}
            ]]

        });

    });
</script>
</body>
</html>